"use strict";
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
// ts中如何定义类
var b;
(function (b) {
    var Person = /** @class */ (function () {
        function Person(age, name) {
            this.name = '雷超'; // 这个是实例的属性
            this.age = 26;
            // this.age = age
            // this.name = name
        }
        return Person;
    }());
    var p1 = new Person();
    console.log(p1);
})(b || (b = {}));
var a;
(function (a) {
    var Person = /** @class */ (function () {
        function Person(myname) {
            this.myname = myname;
        }
        Object.defineProperty(Person.prototype, "name", {
            get: function () {
                return this.myname;
            },
            set: function (newVal) {
                this.myname = newVal.toLocaleUpperCase();
            },
            enumerable: true,
            configurable: true
        });
        return Person;
    }());
    var p = new Person('吴鹏丽abcdefg');
    p.name = 'abcdefg';
    console.log(p.name);
})(a || (a = {}));
var c;
(function (c) {
    var Person = /** @class */ (function () {
        // myname: string;
        // public关键字的作用就是上面和下面的集合
        function Person(myname) {
            this.myname = myname;
            // this.myname = myname;
        }
        Object.defineProperty(Person.prototype, "name", {
            get: function () {
                return this.myname;
            },
            set: function (newVal) {
                this.myname = newVal.toLocaleUpperCase();
            },
            enumerable: true,
            configurable: true
        });
        return Person;
    }());
    var p = new Person('吴鹏丽abcdefg');
})(c || (c = {}));
// 继承
/**
 * 子类继承父类
 * 访问修饰符 public, private protected
 */
var d;
(function (d) {
    var Parent = /** @class */ (function () {
        function Parent(name, age) {
            this.name = name;
            this.age = age;
        }
        Parent.prototype.getName = function () {
            return this.name;
        };
        Parent.prototype.setName = function (name) {
            this.name = name;
        };
        return Parent;
    }());
    var Children = /** @class */ (function (_super) {
        __extends(Children, _super);
        function Children(name, age, stuNo) {
            var _this = _super.call(this, name, age) || this;
            _this.stuNo = stuNo;
            return _this;
        }
        Children.prototype.getStuNo = function () {
            return this.stuNo;
        };
        Children.prototype.setStuNo = function (stuNo) {
            this.stuNo = stuNo;
        };
        Children.prototype.getHa = function () {
            return this.stuNo;
        };
        return Children;
    }(Parent));
    var p = new Parent('雷超', '28');
    var c1 = new Children('小超', '12', 111);
    console.log(c1.getHa());
})(d || (d = {}));
